﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XS.Tunnel.Cad.Cmd.Dto;

namespace XS.Tunnel.Cad.Cmd.Data
{

    public class TunnelRepository : BaseProjectApiService
    {
        /// <summary>
        /// 暗洞坐标信息
        /// </summary>
        /// <param name="id">暗洞信息id</param>
        /// <returns></returns>
        public List<DarkHolePointsOutput> GetDarkHolePoints(string id, string code)
        {
            string structuretUrl = $"api/Client/{MajorPrjectId}/DarkHole/DarkHolePointData/{id}?code={code}";
            var rstult = Get<List<DarkHolePointsOutput>>(structuretUrl);
            var data = rstult.data;
            return data;
        }

        /// <summary>
        /// 获取暗洞信息
        /// </summary>
        /// <param name="dataId">左侧id</param>
        /// <returns></returns>
        public DarkHoleOutput GetDarkHole(string dataId)
        {
            string darkHoleUrl = $"api/Client/{MajorPrjectId}/DarkHole/DarkHoleInfo/{dataId}";
            var rstult = Get<DarkHoleOutput>(darkHoleUrl);
            var data = rstult.data;
            return data;
        }

        public TemporaryForepole GetForepole(string structureId, string code)
        {
            string darkHoleUrl = $"api/Client/{MajorPrjectId}/DarkHole/GetDarkHoleParam/{structureId}?code={code}";
            var rstult = Get<TemporaryForepole>(darkHoleUrl);
            var data = rstult.data;
            return data;

        }

    }
}
